<table width="200" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>

<table width="1000" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="ffeac7">
  <tr>
    <td height="91" valign="top" bgcolor="fffbed">&nbsp;&nbsp;<span class="tit">今日十大名菜</span><br>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
       	  <?php 
          foreach ($recommFood as $v):
          	$foodInfo = FoodPeer::retrieveByPK($v->getObjectId());
          	if($foodInfo):
          	$imgStr = $foodInfo->getImg();
          	$imgsArr= explode('|',$imgStr); 
          ?>
          <td align="center">
          	<a href="/food/intro?id=<?php echo $foodInfo->getId()?>">
          		<img src="<?php echo SITE_URL.'uploads/'.$imgsArr['0']?>" width="80" height="80" border="0" class="img" />
          	</a><br>
          	</td>
          	<?php endif;?>
          <?php endforeach; ?>
        </tr>
        <tr>
          <?php 
          foreach ($recommFood as $v):
          	$foodInfo = FoodPeer::retrieveByPK($v->getObjectId());
          	if($foodInfo):
          ?>
          <td align="center" height="35">
          	<a href="/food/intro?id=<?php echo $foodInfo->getId()?>" class="imgword"><?php echo $foodInfo->getName()?></a><br />
          </td>
         	<?php endif;?>
          <?php endforeach; ?>
        </tr>
    </table></td>
  </tr>
</table>
<table width="200" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="2%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg">
    	<img src="<?php echo SITE_URL?>img/made/made_r5_c2.jpg" width="6" height="33" />
    </td>
    <td width="34%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg" class="weizhi">
    	您当前所在的位置：
    		<a href="<?php echo SITE_URL?>" class="weizhi">首页</a> &gt;&gt;
    		<?php if($scene):?>
    		<a href="<?php echo SITE_URL.'scene/intro?id='.$scene->getId()?>" class="weizhi"> <?php echo $scene->getName()?></a> &gt;&gt;
    		<?php endif;?>
    		<?php echo $eatery->getName()?>
    		</td>
    <td width="44%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg">&nbsp;</td>
    <td width="19%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg" class="login"></td>
    <td width="1%" align="right" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg">
    	<img src="<?php echo SITE_URL?>img/made/made_r5_c23.jpg" width="9" height="33" />
    </td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  height="8"></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="24%" height="553" align="right" valign="top"><table width="231" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="<?php echo SITE_URL?>img/dp/dianp_r2_c2.jpg" width="230" height="8" /></td>
      </tr>
    </table>
      <table width="230" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="30" align="left" valign="top" background="<?php echo SITE_URL?>img/dp/dianp_r5_c2.jpg">&nbsp;&nbsp;<span class="tit">* <?php echo $eatery->getName();?></span></td>
        </tr>
        <tr>
          <td height="219" valign="top" background="<?php echo SITE_URL?>img/dp/dianp_r5_c2.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">
              	<img src="<?php echo SITE_URL.'uploads/'.$eatery->getImg();?>" width="200" height="200" border="0" class="img" />
              </td>
            </tr>
            <tr>
              <td height="15"></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="230" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/dp/dianp_r14_c2.jpg" width="230" height="10" /></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>     
	   <table width="229" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="180" valign="top" background="<?php echo SITE_URL?>img/dp/dianp_r16_c3.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="50" colspan="2" align="left" class="indexdh">店铺评价 / 我也评评</td>
            </tr>
            <tr>
              <td width="19%" height="25" align="left" class="login">味道：</td>
              <td width="81%" align="left" class="login">
              	<ul class="star-rating">
					<li class="current-rating">Currently 3/5 Stars.</li>
					<li><a href="#" title="1 star out of 5" class="one-star">1</a></li>
					<li><a href="#" title="2 stars out of 5" class="two-stars">2</a></li>
					<li><a href="#" title="3 stars out of 5" class="three-stars">3</a></li>
					<li><a href="#" title="4 stars out of 5" class="four-stars">4</a></li>
					<li><a href="#" title="5 stars out of 5" class="five-stars">5</a></li>
				</ul>
			  </td>
            </tr>
            <tr>
              <td height="25" align="left" class="login">价格：</td>
              <td height="25" align="left" class="login">
              	<ul class="star-rating">
					<li class="current-rating1">Currently 2.5/5 Stars.</li>
					<li><a href="#" title="1 star out of 5" class="one-star">1</a></li>
					<li><a href="#" title="2 stars out of 5" class="two-stars">2</a></li>
					<li><a href="#" title="3 stars out of 5" class="three-stars">3</a></li>
					<li><a href="#" title="4 stars out of 5" class="four-stars">4</a></li>
					<li><a href="#" title="5 stars out of 5" class="five-stars">5</a></li>
				</ul> 
			  </td>
            </tr>
            <tr>
              <td height="25" align="left" class="login">环境：</td>
              <td height="25" align="left" class="login">
              	<ul class="star-rating">
					<li class="current-rating2">Currently 2.5/5 Stars.</li>
					<li><a href="#" title="1 star out of 5" class="one-star">1</a></li>
					<li><a href="#" title="2 stars out of 5" class="two-stars">2</a></li>
					<li><a href="#" title="3 stars out of 5" class="three-stars">3</a></li>
					<li><a href="#" title="4 stars out of 5" class="four-stars">4</a></li>
					<li><a href="#" title="5 stars out of 5" class="five-stars">5</a></li>
				</ul> 
			  </td>
            </tr>
            <tr>
              <td height="25" align="left" class="login">服务：</td>
              <td height="25" align="left" class="login">
              	<ul class="star-rating">
					<li class="current-rating3">Currently 2.5/5 Stars.</li>
					<li><a href="#" title="1 star out of 5" class="one-star">1</a></li>
					<li><a href="#" title="2 stars out of 5" class="two-stars">2</a></li>
					<li><a href="#" title="3 stars out of 5" class="three-stars">3</a></li>
					<li><a href="#" title="4 stars out of 5" class="four-stars">4</a></li>
					<li><a href="#" title="5 stars out of 5" class="five-stars">5</a></li>
				</ul>
			  </td>
            </tr>
          </table></td>
        </tr>
      </table>
	  	   <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r16_c1.jpg" width="231" height="7" /></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left" background="<?php echo SITE_URL?>img/made/made_r18_c1.jpg"><table width="95%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td class="tit">&nbsp;&nbsp;* 去过的好吃嘴</td>
              <td class="titsmall">
              	<a href="javascript:been('<?php echo $eatery->getId();?>')">我去过</a>
              </td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td background="<?php echo SITE_URL?>img/made/made_r18_c1.jpg" height="5"></td>
        </tr>
        <tr>
          <td background="<?php echo SITE_URL?>img/made/made_r18_c1.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <?php
          $been1 = array_slice($beenPeople,0,4);
          $been2 = array_slice($beenPeople,4,4); 
          ?>
            <tr>
            	<?php foreach ($been1 as $v):?>
              <td align="center">
              	<img src="<?php echo SITE_URL."ucenter/avatar.php?uid=".$v->getUserId()."&size=small" ?> width="38" height="38" class="headimg" /><br>
              </td>
              	<?php endforeach;?>
            </tr>
            <tr>
        	  <?php 
              foreach ($been1 as $v):
              $info = getUserById($v->getUserId());
              ?>
              <td align="center" height="25">
              	<a href="<?php echo SNS_URL.'/../space.php?uid='.$v->getUserId()?>"class="imgword"><?php echo $info['username']?></a>
              </td>
              <?php endforeach;?>
            </tr>
          </table>
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="5"></td>
              </tr>
            </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <?php foreach ($been2 as $v):?>
              <td align="center">
              	<img src="<?php echo SITE_URL."ucenter/avatar.php?uid=".$v->getUserId()."&size=small" ?> width="38" height="38" class="headimg" /><br>
              </td>
              	<?php endforeach;?>
              </tr>
              <tr>
               <?php 
              foreach ($been2 as $v):
              $info = getUserById($v->getUserId());
              ?>
              <td align="center" height="25">
              	<a href="<?php echo SNS_URL.'/../space.php?uid='.$v->getUserId()?>"class="imgword"><?php echo $info['username']?></a>
              </td>
              <?php endforeach;?>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r22_c1.jpg" width="231" height="7" /></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>
    </td>
    <td width="76%" align="center" valign="top"><table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r30_c10.jpg" width="746" height="11" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="25" valign="top" background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" align="left" class="tit">店铺介绍</td>
            </tr>
          </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="62%" height="25" align="left"><span class="tit">店铺地址：<?php echo $eatery->getAddress()?></span></td>
              <td width="38%" rowspan="5" align="center">
              	<div id="mapObj" class="view" style="width:193px;height:120px"></div>
				<script src="<?php echo SITE_URL?>/js/map.js" type="text/javascript"></script>
				<SCRIPT LANGUAGE="JavaScript">
					<?php if($eatery->getXy()){?>
						var points = point = new MPointOverlay(new MLatLng(<?php echo $eatery->getXy();?>), "<?php echo $eatery->getName();?>"); 
						mapObj.addOverlay(point, true); 
					<?php } ?>
				</script>
              </td>
            </tr>
            <tr>
              <td height="25" align="left"><span class="tit">联系电话：<?php echo $eatery->getTel()?></span></td>
            </tr>
            <tr>
              <td height="25" align="left"><span class="tit">人均消费：<?php echo $eatery->getConsume()?></span></td>
            </tr>
            <tr>
            	<?php $catArray = explode(',',$eatery->getCat());?>
              <td height="25" align="left"><span class="tit">主营类型：
              	<?php 
              		foreach ($catArray as $v){
              			if($v == "1"){
              				echo "中餐 ";
              			}
              			if($v == "2"){
              				echo "西餐 ";
              			}
              			if($v == "3"){
              				echo "火锅 ";
              			}
              			if($v == "4"){
              				echo "小吃 ";
              			}
              			if($v == "5"){
              				echo "酒吧";
              			}
              		}
              	?>
              </span></td>
            </tr>
            <tr>
              <td align="left"><span class="tit">详细介绍：</span><span class="word"><?php echo $eatery->getDes()?></span></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r39_c10.jpg" width="746" height="9" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td  height="8"></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/dp/dianp_r9_c7.jpg" width="749" height="7" /></td>
        </tr>
      </table>
      <table width="749" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" background="<?php echo SITE_URL?>img/dp/dianp_r10_c7.jpg"><table width="95%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" colspan="5" align="left" class="tit"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="89%">特色菜 </td>
                    <td width="11%"><a href="<?php echo SITE_URL?>food/create">我要补充</a></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td><img src="<?php echo SITE_URL?>img/no/no_width.gif" width="130" height="85" class="img" /></td>
              <td><img src="<?php echo SITE_URL?>img/dp/dianp_r12_c8.jpg" width="130" height="85" class="img" /></td>
              <td><img src="<?php echo SITE_URL?>img/no/no_width.gif" width="130" height="85" class="img" /></td>
              <td><img src="<?php echo SITE_URL?>img/dp/dianp_r12_c8.jpg" width="130" height="85" class="img" /></td>
              <td><img src="<?php echo SITE_URL?>img/dp/dianp_r12_c8.jpg" width="130" height="85" class="img" /></td>
            </tr>
            <tr>
              <td height="25" align="center" class="yh"><a href="#">菜名</a></td>
              <td height="25" align="center" class="yh"><a href="#">菜名</a></td>
              <td height="25" align="center" class="yh"><a href="#">菜名</a></td>
              <td height="25" align="center" class="yh"><a href="#">菜名</a></td>
              <td height="25" align="center" class="yh"><a href="#">菜名</a></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/dp/dianp_r17_c7.jpg" width="749" height="7" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r30_c10.jpg" width="746" height="11" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="35" align="left" background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg" class="tit">&nbsp;&nbsp;&nbsp;&nbsp; 网友讨论 </td>
        </tr>
        <tr>
          <td background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg">
          <?php
         	 	foreach ($comments->getResults() as $k =>$v):
         	 		$user = getUserById($v->getUserId());
          ?>
		      	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		            <tr>
		              <td height="25" align="left">
		              	<span class="yh"><?php echo $user['username']?>：</span>
		              	<span class="word"><?php echo $v->getContent();?></span>
		              </td>
		            </tr>
		          </table>
		            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		              <tr>
		                <td height="1" bgcolor="#FBD0B0"></td>
		              </tr>
		            </table>
		            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		              <tr>
		                <td height="5"></td>
		              </tr>
		            </table>
            <?php endforeach;?>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="30" align="center" class="yh">
                <?php if( $comments->haveToPaginate() ): ?>
					<?php echo link_to('上页','/eatery/index?id='.$id.'&page='.$comments->getPreviousPage()) ?>
			
					<?php foreach ( $comments->getLinks() as $page ): ?>
						<?php echo link_to_unless($page == $comments->getPage(),$page,'/eatery/index?id='.$id.'&page='.$page) ?>
						<?php echo ($page != $comments->getCurrentMaxLink()) ? '-':'' ?>
					<?php endforeach; ?>
					<?php echo link_to('下页','/eatery/index?id='.$id.'&page='.$comments->getNextPage()) ?>
				<?php endif; ?></td>
              </tr>
            </table>
            
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="30" align="left" class="tit">我也说两句</td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td align="center" background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg">
            <form id="commentsForm" name="commentsForm" method="post" action="/comments/update">
	          	<textarea name="content" cols="90" rows="5" class="textinfo"></textarea></td>
	          	<input type="hidden" name="object_type" value="eatery">
	            <input type="hidden" name="object_id" value="<?php echo $eatery->getId()?>">
            </form>
        </tr>
        <tr>
          <td height="50" align="center" background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg" class="tit"><table width="48" height="31" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td background="<?php echo SITE_URL?>img/anniu/anniu_r16_c8.png" onclick="$('form')[0].submit()">&nbsp;<span class="indexdh">发表</span></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r39_c10.jpg" width="746" height="9" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
<script>
function been(id){
	$.get('/eatery/been',{id:id,type:'eatery'},function(msg){
		location.reload();
	});
}
</script>
